package com.dingqb.ktdemo.base

import java.util.*


fun main(args: Array<String>) {
    //ifelse_(11, 22);
    System.err.println(hasPreFix(101.toString()))
}


// 条件控制判断
fun ifelse_(a: Int, b: Int): String? {
    var str: String? = "流程控制";
    var result: Int = if (a > b) a else b;
    var r = str + result.toString();
    var muxue_susuyuanliu_nanasun_: String = "18-10,19-711,19-711";
    println("$r");
    println("$muxue_susuyuanliu_nanasun_")
    return r;
}

fun hasPreFix(x: Any) = when (x) {
    is String -> "x is String";
    is Int -> "x is Int"
    else -> "else ";

}

